import { request } from "@/utils/request"

//获取文章点赞数
export function getPraiseCount(params){
    return request({
        method:'get',
        url:'/common/praiseCount',
        params:params,
        headers: {
            'token': window.localStorage.token,
        }
    })
}

//是否点赞过
export function isPraised(params){
    return request({
        method:'get',
        url:'/common/isPraised',
        params:params,
        headers: {
            'token': window.localStorage.token,
        }
    })
}

//点赞
export function praise(params){
    return request({
        method:'get',
        url:'/common/praise',
        params:params,
        headers: {
            'token': window.localStorage.token,
        }
    })
}

//收藏
export function collect(params){
    return request({
        method:'get',
        url:'/common/collect',
        params:params,
        headers: {
            'token': window.localStorage.token,
        }
    })
}
//获取收藏数
export function getCollectedCount(params){
    return request({
        method: 'get',
        url:'/common/collectedCount',
        params:params,
        headers: {
            'token': window.localStorage.token,
        }
    })
}
//是否收藏
export function isCollected(params){
    return request({
        method:'get',
        url:'/common/isCollected',
        params:params,
        headers: {
            'token': window.localStorage.token,
        }
    })
}